<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnFileStatusInOrderTable extends AbstractMigration
{
    public function up()
    {
        $this->table('order')
            ->addColumn('file_status', 'enum', [
                'values' => 'party_a_in_production,wait_party_a_upload,party_a_uploaded,party_b_in_production,wait_party_b_upload,wait_party_a_download,party_a_downloaded',
                'default' => 'party_a_in_production',
                'null' => false,
                'comment' => '订单文件状态',
            ])
            ->save();
    }

    public function down()
    {
        $this->table('order')->removeColumn('file_status')->save();
    }
}
